/**
 * Project Name:sc-eureka-ribbon
 * File Name:ConsumerController.java
 * Package Name:com.sc.test.consumer
 * Date:2016年12月13日上午10:46:25
 * Copyright (c) 2016, 杭州知时信息科技有限公司 All Rights Reserved.
 *
*/

package com.sc.test.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import com.netflix.discovery.converters.Auto;

/**
 * ClassName:ConsumerController <br/>
 * Function: <br/>
 * Date:     2016年12月13日 上午10:46:25 <br/>
 * @author   guooo
 * @version  
 * @since    JDK 1.6
 * @see 	 
 */
@RestController
public class ConsumerController {
    

    @Autowired
    RestTemplate restTemplate;
    
    @RequestMapping(value = "/add" ,method = {RequestMethod.GET,RequestMethod.POST})
    public String add(){
        return restTemplate.getForEntity("http://guooo-pc:2222/add?a=10&b=20", String.class).getBody();
    }
}

